<?php
namespace Home\Controller;
use Think\Controller;
class TribeController extends CommonController {
    public function data_list(){
        $limit = I("pageSize", 30, "intval"); 
        $page = I("pageCurrent", 1, "intval");
        $model = D("Tribe");
        if(I("orderField")!=null&&I("orderDirection")!=null){
            $order = I("orderField").' '.I("orderDirection");
        }
        $condition['tr_name'] = array('like','%'.I('search_words').'%');
        $count = $model->get_count($condition);
        $dataList = $model->get_tribe_list($condition, $limit, $page,"*",$order);
        $this->assign("count",$count);
        $this->assign("dataList",$dataList);
    	$this->display();
    }
}
?>